<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Persona
 *
 * @author Lawrence
 */
require_once 'ConexionBD.php';

class Persona {
    
    private $idPersona;
    private $nombre;
    private $apellido;
    private $email;
    private $username;
    private $password;
    private $telefono;
    private $rol;
    private $fkFundacion;
    private $cedula;
    
    public function getIdPersona() {
        return $this->idPersona;
    }

    public function setIdPersona($idPersona) {
        $this->idPersona = $idPersona;
    }

    public function getNombre() {
        return $this->nombre;
    }

    public function setNombre($nombre) {
        $this->nombre = $nombre;
    }

    public function getApellido() {
        return $this->apellido;
    }

    public function setApellido($apellido) {
        $this->apellido = $apellido;
    }

    public function getEmail() {
        return $this->email;
    }

    public function setEmail($email) {
        $this->email = $email;
    }

    public function getUsername() {
        return $this->username;
    }

    public function setUsername($username) {
        $this->username = $username;
    }

    public function getPassword() {
        return $this->password;
    }

    public function setPassword($password) {
        $this->password = $password;
    }

    public function getTelefono() {
        return $this->telefono;
    }

    public function setTelefono($telefono) {
        $this->telefono = $telefono;
    }

    public function getRol() {
        return $this->rol;
    }

    public function setRol($rol) {
        $this->rol = $rol;
    }

    public function getFkFundacion() {
        return $this->fkFundacion;
    }

    public function setFkFundacion($fkFundacion) {
        $this->fkFundacion = $fkFundacion;
    }

    public function getCedula() {
        return $this->cedula;
    }

    public function setCedula($cedula) {
        $this->cedula = $cedula;
    }
    
    public function testConsulta()
    {
        $miBD = new ConexionBD();
        $miBD->setConexion($miBD->conectarBD($miBD));
        
        $query = "Select * from persona";
        $resultado = mysql_query($query,$miBD->getConexion());
        
        while($fila = mysql_fetch_array($resultado))
        {
            echo "<tr>";
            echo "<td>Id: ".$fila['idPersona']."</td></br>";
            echo "<td>Nombre: ".$fila['nombre']."</td></br>";
            echo "<td>Apellido: ".$fila['apellido']."</td></br>";
            echo "<td>Cedula: ".$fila['cedula']."</td></br>";
            echo "<td>Telefono: ".$fila['telefono']."</td></br>";
            echo "<td>Email: ".$fila['email']."</td></br>";
            echo "<td>UserName: ".$fila['userName']."</td></br>";
            echo "<td>Password: ".$fila['password']."</td></br>";
            echo "<td>Rol: ".$fila['rol']."</td></br>";
            echo "<td>FkFundacion: ".$fila['fkFundacion']."</td></br>";
            echo "</tr></br>";
        }
    }


    
}

?>
